The invention relates generally to computer systems, and more particularly to outputting information such as via HTML pages on a computer system.
Contemporary applications are migrating toward embedding HTML (hypertext mark-up language) therein, so that at least some of their output, such as charts, graphs and reports, may be drawn via HTML pages. To this end, a client application places its drawing and printing code into ActiveX(copyright) controls, and then creates one or more HTML pages specifying those ActiveX(copyright) controls. When a browser or the like renders the page, the ActiveX(copyright) code is instantiated, and, for example, draws the desired report and/or chart. As can be readily appreciated, the use of HTML pages enables page designers and the like to develop pages via familiar, user-friendly editing mechanisms independent from the code that actually determines the output and draws the display.
However, many existing applications (e.g., Microsoft(copyright) Money 97) were not developed to provide their output via HTML pages. Instead, these programs typically comprise a large executable file that includes the drawing (and printing) code therein for outputting charts, reports and so on. Such drawing code is tightly integrated into the application, and thus there is no straightforward way in which to move the report and chart drawing code into ActiveX(copyright) controls so that the code may be used in an HTML page. Because of the drawing code""s deep integration into the rest of the code, not only would moving the drawing code into ActiveX(copyright) controls be a formidable and labor-intensive task, but would likely result in code that was filled with bugs, if indeed such code worked at all.
Briefly, the present invention provides a method and system that allows client code such as drawing code to remain in the client application yet allows the code to be used in a control such as an ActiveX(copyright) control, thereby enabling existing applications to provide output via HTML pages. To this end, a page including the control is created at a client window, and the client instructs a page rendering mechanism such as a browser to render the page, whereby the control is instantiated. The control is provided with a handle to the client window, and, using the handle, the control walks up the chain of its parent windows sending messages to locate the client window. Via the message, when the correct client window is located, the control sends its control window handle to the client window, whereby the client window is able to subclass the control window. The client is then able to perform operations in the control""s window, such as to draw reports, charts, graphs and the like therein.
Other advantages will become apparent from the following detailed description when taken in conjunction with the drawings, in which: